<?php

namespace app\ocr\controller;

use app\controllers\ApiController;


class OcrController extends ApiController
{
    /**
     * @return array
     */
    public function actionOcr(): array
    {
        try {
            $req = [
                "ImageUrl" => ''
            ];
            $resp = \Yii::$app->ocr->BankSlipOCR($req);
            return parent::jsonSuccess($resp);
        } catch (\Exception $e) {
            return parent::jsonFail($e->getMessage(), $e->getCode());
        }
    }
}